//mock模拟数据
import Mock from 'mockjs'

//图表数据
let List = []
export default {
	getStatisticalData: () => {
		//Mock.Random.float产生随机数100到8000之间 保留小数 最小0位，最大0位 
		for(let i=1;i<=7;i++){
			List.push(
				Mock.mock({
					成交单数: Mock.Random.float(100,8000,0,0),
					交易金额: Mock.Random.float(100,8000,0,0),
					// 西红柿: Mock.Random.float(100,8000,0,0),
					// 茄子: Mock.Random.float(100,8000,0,0),
					// 大葱: Mock.Random.float(100,8000,0,0),
					// 萝卜: Mock.Random.float(100,8000,0,0)
				})
			)
		}
		return {
			code:20000,
			data:{
				//饼图
				videoData:[
					{
						name:'白菜',
						value:2999
					},
					{
						name:'土豆',
						value:5999
					},
					{
						name:'西红柿',
						value:1500
					},
					{
						name:'茄子',
						value:1999
					},
					{
						name:'大葱',
						value:2200
					},
					{
						name:'萝卜',
						value:4500
					},
				],
				//柱状图
				userData:[
					{
						date:'周一',
						new:20,
						active:200
					},
					{
						date:'周二',
						new:250,
						active:500
					},
					{
						date:'周三',
						new:250,
						active:550
					},
					{
						date:'周四',
						new:400,
						active:800
					},
					{
						date:'周五',
						new:300,
						active:600
					},
					{
						date:'周六',
						new:350,
						active:700
					},
					{
						date:'周日',
						new:50,
						active:100
					},
				],
				//折线图
				orderData:{
					date:['星期1','星期2','星期3','星期4','星期5','星期6','星期日'],
					data:List
				},
				tableData:[
					{
						name:'白菜',
						todayBuy:300,
						monthBuy:300,
						totalBuy:800
					},
					{
						name:'土豆',
						todayBuy:300,
						monthBuy:300,
						totalBuy:900
					},
					{
						name:'西红柿',
						todayBuy:200,
						monthBuy:300,
						totalBuy:1000
					},
					{
						name:'茄子',
						todayBuy:350,
						monthBuy:300,
						totalBuy:700
					},
					{
						name:'大葱',
						todayBuy:100,
						monthBuy:300,
						totalBuy:600
					},
					{
						name:'萝卜',
						todayBuy:100,
						monthBuy:300,
						totalBuy:500
					}
				]
			}
		}
	}
}